'use strict';
const path = require('path');

module.exports = {
  dev: {
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    host: 'localhost',
    port: 9960,
    autoOpenBrowser: false,
    errorOverlay: true,
    notifyOnErrors: true,
    poll: false,
    useEslint: true,
    showEslintErrorsInOverlay: false,
    devtool: 'eval-source-map',
    cacheBusting: true,
    cssSourceMap: false,
    env: require('./dev.env'),
    proxy: {
      "/api": {
        target: "http://127.0.0.1:9980",
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      }
    }
  },

  prod: {
    env: require('./prod.env'),
    index: path.resolve(__dirname, '../cms_web/index.html'),
    assetsRoot: path.resolve(__dirname, '../cms_web'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/cms_web/',
    productionSourceMap: true,
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  },

  test: {
    env: require('./test.env'),
    index: path.resolve(__dirname, '../cms_web/index.html'),
    assetsRoot: path.resolve(__dirname, '../cms_web'),
    assetsSubDirectory: 'static',
    assetsPublicPath: '/cms_web/',
    productionSourceMap: true,
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  }
};
